home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / organiza / catstuff.sit / CatStuff v2.0 / background_3149.txt < prev    next >
Encoding:
Text File  |  1990-05-29  |  8.3 KB  |  386 lines

  1. -- background: 3149 from stack: in.0
  2. -- bmap block id: 4484
  3. -- flags: 4000
  4. -- background id: 0
  5. -- name: Main
  6. ----- HyperTalk script -----
  7. on closeCard
  8.   set scroll of field "Catalog" to 0
  9. end closeCard
  10.  
  11.  
  12. -- part 2 (field)
  13. -- low flags: 01
  14. -- high flags: 2007
  15. -- rect: left=5 top=101 right=280 bottom=505
  16. -- title width / last selected line: 0
  17. -- icon id / first selected line: 0 / 0
  18. -- text alignment: 0
  19. -- font id: 4
  20. -- text size: 9
  21. -- style flags: 0
  22. -- line height: 12
  23. -- part name: Catalog
  24.  
  25.  
  26. -- part 3 (button)
  27. -- low flags: 00
  28. -- high flags: 2004
  29. -- rect: left=5 top=279 right=336 bottom=62
  30. -- title width / last selected line: 0
  31. -- icon id / first selected line: 902 / 902
  32. -- text alignment: 1
  33. -- font id: 0
  34. -- text size: 12
  35. -- style flags: 0
  36. -- line height: 16
  37. -- part name: Previous
  38. ----- HyperTalk script -----
  39. on mouseUp
  40.   go to previous card of background "Main"
  41. end mouseUp
  42.  
  43.  
  44.  
  45. -- part 5 (button)
  46. -- low flags: 00
  47. -- high flags: 2004
  48. -- rect: left=60 top=279 right=336 bottom=117
  49. -- title width / last selected line: 0
  50. -- icon id / first selected line: 26425 / 26425
  51. -- text alignment: 1
  52. -- font id: 0
  53. -- text size: 12
  54. -- style flags: 0
  55. -- line height: 16
  56. -- part name: Next
  57. ----- HyperTalk script -----
  58. on mouseUp
  59.   go to next card of background "Main"
  60. end mouseUp
  61.  
  62.  
  63.  
  64. -- part 10 (button)
  65. -- low flags: 00
  66. -- high flags: A004
  67. -- rect: left=174 top=279 right=336 bottom=231
  68. -- title width / last selected line: 0
  69. -- icon id / first selected line: 8538 / 8538
  70. -- text alignment: 1
  71. -- font id: 0
  72. -- text size: 12
  73. -- style flags: 0
  74. -- line height: 16
  75. -- part name: Find
  76. ----- HyperTalk script -----
  77. on mouseUp
  78.   doMenu "Find..."
  79. end mouseUp
  80.  
  81.  
  82.  
  83. -- part 11 (button)
  84. -- low flags: 00
  85. -- high flags: A004
  86. -- rect: left=229 top=279 right=336 bottom=286
  87. -- title width / last selected line: 0
  88. -- icon id / first selected line: 20186 / 20186
  89. -- text alignment: 1
  90. -- font id: 0
  91. -- text size: 12
  92. -- style flags: 0
  93. -- line height: 16
  94. -- part name: Sort Cards
  95. ----- HyperTalk script -----
  96. on mouseUp
  97.   answer "Sort by which field?" with "Disk Name" or "Disk Box" or "Disk Label"
  98.   if it is "Disk Name" then
  99.     lock screen
  100.     set cursor to watch
  101.     sort by field "Name"
  102.   else
  103.     if it is "Disk Box" then
  104.       lock screen
  105.       set cursor to watch
  106.       sort by field "Box"
  107.     else
  108.       answer "Sort how?" with "Text" or "Numeric"
  109.       lock screen
  110.       set cursor to watch
  111.       if it is "Numeric" then
  112.         sort numeric by field "Label"
  113.       else
  114.         sort text by field "Label"
  115.       end if
  116.     end if
  117.   end if
  118.   go to first card of background "Main"
  119.   unlock screen
  120.   set cursor to hand
  121. end mouseUp
  122.  
  123.  
  124.  
  125. -- part 9 (button)
  126. -- low flags: 00
  127. -- high flags: A004
  128. -- rect: left=284 top=279 right=336 bottom=341
  129. -- title width / last selected line: 0
  130. -- icon id / first selected line: 1 / 1
  131. -- text alignment: 1
  132. -- font id: 0
  133. -- text size: 12
  134. -- style flags: 0
  135. -- line height: 16
  136. -- part name: Read Disk
  137. ----- HyperTalk script -----
  138. on mouseUp
  139.   answer "Replace contents of this card?" with "Cancel" or "Ok"
  140.   if it is "Ok" then
  141.     put CatStuff() into catalog
  142.     if line 1 of catalog is "OK" then
  143.       put line 2 of catalog into field "Name"
  144.       put item 1 of line 3 of catalog into field "Size"
  145.       put item 2 of line 3 of catalog into field "Free"
  146.       put the abbrev date into field "Date"
  147.       delete line 1 to 3 of catalog
  148.       put catalog into field "Catalog"
  149.     end if
  150.   end if
  151. end mouseUp
  152.  
  153.  
  154.  
  155. -- part 8 (button)
  156. -- low flags: 00
  157. -- high flags: A004
  158. -- rect: left=339 top=279 right=336 bottom=396
  159. -- title width / last selected line: 0
  160. -- icon id / first selected line: 1 / 1
  161. -- text alignment: 1
  162. -- font id: 0
  163. -- text size: 12
  164. -- style flags: 0
  165. -- line height: 16
  166. -- part name: New Card
  167. ----- HyperTalk script -----
  168. on mouseUp
  169.   if the commandKey is up then
  170.     put doit() into ok
  171.   else
  172.     ask "Box name for multiple read?"
  173.     put it into boxname
  174.     answer "Auto-number the labels?" with "No" or "Yes"
  175.     if it is "Yes" then
  176.       ask "Start with what number?"
  177.       put it into labelnum
  178.     else
  179.       put empty into labelnum
  180.     end if
  181.     put true into ok
  182.     repeat while ok
  183.       put doit() into ok
  184.       if ok then
  185.         put boxname into field "Box"
  186.         if labelnum is empty then
  187.           ask "Disk label?"
  188.           put it into field "Label"
  189.         else
  190.           put labelnum into field "Label"
  191.           add 1 to labelnum
  192.         end if
  193.       end if
  194.     end repeat
  195.   end if
  196. end mouseUp
  197.  
  198. function doit
  199. doMenu "New Card"
  200. put CatStuff() into catalog
  201. if line 1 of catalog is "OK" then
  202.   put line 2 of catalog into field "Name"
  203.   put item 1 of line 3 of catalog into field "Size"
  204.   put item 2 of line 3 of catalog into field "Free"
  205.   put the abbrev date into field "Date"
  206.   delete line 1 to 3 of catalog
  207.   put catalog into field "Catalog"
  208.   return true
  209. else
  210.   doMenu "Delete Card"
  211.   return false
  212. end if
  213. end doit
  214.  
  215.  
  216.  
  217. -- part 7 (button)
  218. -- low flags: 00
  219. -- high flags: A004
  220. -- rect: left=394 top=279 right=336 bottom=451
  221. -- title width / last selected line: 0
  222. -- icon id / first selected line: 2 / 2
  223. -- text alignment: 1
  224. -- font id: 0
  225. -- text size: 12
  226. -- style flags: 0
  227. -- line height: 16
  228. -- part name: Kill Card
  229. ----- HyperTalk script -----
  230. on mouseUp
  231.   if the commandKey is up then
  232.     answer "Delete this card?" with "Cancel" or "Ok"
  233.     if it is "Ok" then
  234.       lock screen
  235.       doMenu "Delete Card"
  236.       go to background "Main"
  237.       unlock screen
  238.     end if
  239.   else
  240.     answer "Remove all data cards?" with "Ok" or "Cancel"
  241.     if it is "Ok" then
  242.       lock screen
  243.       go to first card of background "Main"
  244.       repeat while (the number of cards of background "Main") Γëá 1
  245.         set cursor to busy
  246.         doMenu "Delete Card"
  247.       end repeat
  248.       doMenu "New Card"
  249.       go to first card of background "Main"
  250.       doMenu "Delete Card"
  251.       set cursor to watch
  252.       doMenu "Compact Stack"
  253.       set cursor to hand
  254.       unlock screen
  255.     end if
  256.   end if
  257. end mouseUp
  258.  
  259.  
  260.  
  261. -- part 12 (button)
  262. -- low flags: 00
  263. -- high flags: 2004
  264. -- rect: left=449 top=279 right=336 bottom=506
  265. -- title width / last selected line: 0
  266. -- icon id / first selected line: 1020 / 1020
  267. -- text alignment: 1
  268. -- font id: 0
  269. -- text size: 12
  270. -- style flags: 0
  271. -- line height: 16
  272. -- part name: Help/Info
  273. ----- HyperTalk script -----
  274. on mouseUp
  275.   push card
  276.   go to card "Help" of background "Title"
  277. end mouseUp
  278.  
  279.  
  280.  
  281. -- part 6 (button)
  282. -- low flags: 00
  283. -- high flags: 2004
  284. -- rect: left=115 top=279 right=336 bottom=172
  285. -- title width / last selected line: 0
  286. -- icon id / first selected line: 20098 / 20098
  287. -- text alignment: 1
  288. -- font id: 0
  289. -- text size: 12
  290. -- style flags: 0
  291. -- line height: 16
  292. -- part name: Home
  293. ----- HyperTalk script -----
  294. on mouseUp
  295.   if the commandkey is up then
  296.     go home
  297.   else
  298.     doMenu "Open Stack..."
  299.   end if
  300. end mouseUp
  301.  
  302.  
  303.  
  304. -- part 14 (field)
  305. -- low flags: 00
  306. -- high flags: 2002
  307. -- rect: left=84 top=6 right=25 bottom=505
  308. -- title width / last selected line: 0
  309. -- icon id / first selected line: 0 / 0
  310. -- text alignment: 0
  311. -- font id: 3
  312. -- text size: 9
  313. -- style flags: 0
  314. -- line height: 12
  315. -- part name: Label
  316.  
  317.  
  318. -- part 15 (field)
  319. -- low flags: 00
  320. -- high flags: 2002
  321. -- rect: left=84 top=24 right=43 bottom=505
  322. -- title width / last selected line: 0
  323. -- icon id / first selected line: 0 / 0
  324. -- text alignment: 0
  325. -- font id: 3
  326. -- text size: 9
  327. -- style flags: 0
  328. -- line height: 12
  329. -- part name: Box
  330.  
  331.  
  332. -- part 16 (field)
  333. -- low flags: 01
  334. -- high flags: 2002
  335. -- rect: left=84 top=60 right=79 bottom=141
  336. -- title width / last selected line: 0
  337. -- icon id / first selected line: 0 / 0
  338. -- text alignment: 0
  339. -- font id: 3
  340. -- text size: 9
  341. -- style flags: 0
  342. -- line height: 12
  343. -- part name: Free
  344.  
  345.  
  346. -- part 18 (field)
  347. -- low flags: 01
  348. -- high flags: 2002
  349. -- rect: left=369 top=60 right=79 bottom=505
  350. -- title width / last selected line: 0
  351. -- icon id / first selected line: 0 / 0
  352. -- text alignment: 0
  353. -- font id: 3
  354. -- text size: 9
  355. -- style flags: 0
  356. -- line height: 12
  357. -- part name: Date
  358.  
  359.  
  360. -- part 20 (field)
  361. -- low flags: 01
  362. -- high flags: 2002
  363. -- rect: left=84 top=42 right=61 bottom=505
  364. -- title width / last selected line: 0
  365. -- icon id / first selected line: 0 / 0
  366. -- text alignment: 0
  367. -- font id: 3
  368. -- text size: 9
  369. -- style flags: 0
  370. -- line height: 12
  371. -- part name: Name
  372.  
  373.  
  374. -- part 21 (field)
  375. -- low flags: 01
  376. -- high flags: 2002
  377. -- rect: left=219 top=60 right=79 bottom=276
  378. -- title width / last selected line: 0
  379. -- icon id / first selected line: 0 / 0
  380. -- text alignment: 0
  381. -- font id: 3
  382. -- text size: 9
  383. -- style flags: 0
  384. -- line height: 12
  385. -- part name: Size
  386.